import pytest

from flask import Flask
from flask_black import Black


@pytest.fixture
def app():
    app = Flask(__name__)
    app.config[
        'SQLALCHEMY_DATABASE_URI'] = "mysql+mysqlconnector://black:hyh282038@152.136.187.128/black_test"
    app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
    Black(app)
    yield app



@pytest.fixture
def client(app):
    yield app.test_client()
